package operation;

import book.BookList;
import book.ListNode;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: mac
 * Date: 2022-09-08
 * Time: 11:04
 */
public class RemoveOperation implements IOperation{
    public void work(BookList bookList) {
        System.out.println("清空书架！系统提示您：请谨慎操作");
        System.out.println("您是否要清空整个书架： one - 是  other number - 否");
        int index = scanner.nextInt();
        if (index == 1){
            bookList.setHead(null);
            System.out.println("清空成功");
            return;
        }
        System.out.println("您的清空操作未执行！");
    }
}
